package com.demo.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import java.util.Map;

@Component
@Validated
//通过Value注解设置值
public class PersonValues {

//    @Value("${person.lastName}")
    private String listName_1;
    @Value("#{2*3}")
    private Integer age;
    @Value("true")
    private boolean isf;
    //不支持
    //@Value("${person.maps}")
    private Map<String,Object> maps;
    private String isEmail;
    @Override
    public String toString() {
        return "PersonValues{" +
            "listName_1='" + listName_1 + '\'' +
            ", age=" + age +
            ", isf=" + isf +
            '}';
    }

}
